#include "resulttreeview.h"
#include <QMouseEvent>

ResultTreeView::ResultTreeView()
	: QTreeView()
{

}

ResultTreeView::~ResultTreeView()
{

}

ResultTreeView::ResultTreeView(QWidget *parent)
:QTreeView(parent)
{

}


void ResultTreeView::mousePressEvent(QMouseEvent *event)
{

	if(event->button() == Qt::RightButton)
	{
		QTreeView::mousePressEvent(event);
		QPoint pos = event->pos();
		QPersistentModelIndex index = indexAt(pos);
		if(index.isValid())
		{
			emit rightClicked(index);
		}
	}else
	{
		QTreeView::mousePressEvent(event);
	}
}